{% extends "stg_inv.html" %}
{% block title %}Batch Inventory Summary{% endblock %}
{% block body %}
<p><a href="/">&larr;Hachoir Top</a></p>
<p><a href="{% url 'stg_index' %}">&larr;Staging</a></p>
<h1>{% block heading %}{% if title %}{{ title }}{% else %}Inventory Summary{% endif %}{% endblock %}</h1>


{% if counts %}
    <ul>
    {% for c in counts %}
        <li>{{ c.name }}: {{ c.value }}</li>
    {% endfor %}
    </ul>
{% endif %}


{% if not_started %}
    <h2>Batches not yet started</h2>
    <ul>
    {% for b in not_started %}
        <li><a href="{{ b.get_absolute_url }}">{{ b }}</a></li>
    {% endfor %}
    </ul>
{% endif %}


{% if dead %}
    <h2>Batches started, but interrupted (dead)</h2>
    <ul>
    {% for b in dead %}
        <li><a href="{{ b.get_absolute_url }}">{{ b }}</a></li>
    {% endfor %}
    </ul>
    
    <p>You can also try to <a href="{% url 'djhcup_staging.views.batch_reset_dead' %}" class="special">reset dead batches</a> automagically.</p>
{% endif %}


{% if started %}
    <h2>Batches started, but not completed</h2>
    <ul>
    {% for b in started %}
        <li><a href="{{ b.get_absolute_url }}">{{ b }}</a></li>
    {% endfor %}
    </ul>
{% endif %}


{% if completed %}
    <h2>Batches completed</h2>
    <ul>
    {% for b in completed %}
        <li><a href="{{ b.get_absolute_url }}">{{ b }}</a></li>
    {% endfor %}
    </ul>
{% endif %}


{% endblock %}
